home *** CD-ROM | disk | FTP | other *** search
- Path: news.crystalball.com!news
- From: Larry Weiss <lfw@oc.com>
- Newsgroups: comp.lang.c
- Subject: Re: H&S <=> K&R
- Date: Thu, 07 Mar 1996 16:26:52 -0600
- Organization: crystalball.com
- Message-ID: <313F62AC.7AE5@oc.com>
- References: <4hnjgp$brj@cisunix1.dfci.harvard.edu>
- NNTP-Posting-Host: external.oc.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- Godfrey Degamo wrote:
- >
- > First, my H&S 4th edition mentions nothing (I think) on
- > fflush with argument NULL. However, my ANSI K&R book clearly states
- > that fflush( NULL) flushes all output stream. My K&R book is
- > copyright 1988, my H&S book is copyright 1995. So, has this
- > feature of ANSI C changed? (Or am I just overlooking something?)
-
-
- Quoting the Standard:
-
- 7.9.5.2 The fflush function
-
- Synopsis
- #include <stdio.h>
- int fflush(FILE *stream)
-
- Description
- If stream points to an output stream or an update stream in which the most
- recent operation was not input, the fflush function causes any unwritten data
- for that stream to be delivered to the host environment to be written to the
- file; otherwise, the behavior is undefined.
- If steam is a null pointer, the fflush function performs this flushing action
- on all streams for which the behavior is defined above.
-
- Returns
- The fflush function returns EOF if a write error occurs, otherwise zero.
-